package com.yincheng.oes.business.consist;

/**
 * @Author: yangsy
 * @Contact: 446948434@qq.com
 * @Date: 2021/8/27 21:31
 * @Version: 1.0
 * @Description:
 */
public enum ResultCodeEnum {

    SUCCESS(0, "success"),
    TIME_OUT(504, "time out"),
    AUTH_FAIL(401, "auth failed"),
    PARAM_ERROR(403, "param error"),
    NO_QUERY_PARAM(407, "query param is null"),
    SERVER_ERROR(500, "server has wrong"),
    DATABASE_ERROR(505, "database has wrong"),
    DUPLICATE_REQ(408, "duplicate req");

    private Integer code;
    private String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
